package com.paulshiyc.threadpooldemo.task;
/**
 * 模拟待办分发任务
 * @author PaulShi
 *
 */
public class SendBacklogTask implements Runnable {
	//要发送用户
	private String sendUser;
	//信息
	private String msg;
	
	public SendBacklogTask() {
		super();
	}

	public SendBacklogTask(String sendUser, String msg) {
		super();
		this.sendUser = sendUser;
		this.msg = msg;
	}

	/**
	 * 启动任务线程的处理方法
	 */
	public void run() {
		try {
			//模拟发送待办任务需要3s
			Thread.sleep(3000);
			System.out.println(Thread.currentThread().getName() + " run --- send User : "+sendUser +" send msg : "+msg);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
